import React, { useState, useEffect } from 'react';

import styles from './index.less';

import { Descriptions } from 'antd';

export default function Homes(props) {
  const [state, setState] = useState(0);
  const clickName = () => {
    if (state === 7) {
      alert('win');
      setState(0);
    } else {
      setState(state + 1);
    }
  };

  return (
    <div className={styles.person_wrap}>
      <Descriptions title="To Me" className={styles.person_top}>
        <Descriptions.Item label="Name">
          <span onClick={clickName}>胡向超</span>
        </Descriptions.Item>
        <Descriptions.Item label="Telephone">17637511220</Descriptions.Item>
        <Descriptions.Item label="Live">Hangzhou, Zhejiang</Descriptions.Item>
        <Descriptions.Item label="Remark">empty</Descriptions.Item>
        <Descriptions.Item label="Address">
          No. 18, Wantang Road, Xihu District, Hangzhou, Zhejiang, China
        </Descriptions.Item>
      </Descriptions>
      <div className={styles.person_bottom}>
        <img
          src="https://w.wallhaven.cc/full/g8/wallhaven-g8zodl.jpg"
          width="100%"
        />
      </div>
    </div>
  );
}
